<extend name="../Public/model" />
<block name="title">添加{$TITLE}</block>
<block name="body">
    <form class="form form-horizontal form-validate" id="form-ajax-Form" action="{:U('add')}" method="post">
        <input type="hidden" name="parent_id" id="parent_id" value="{$parent_id}" />
        <input type="hidden" name="cate_level" id="cate_level" value="{$cate_level}" />
        <div id="tab-system" class="HuiTab">
            <div class="tabBar cl"><span>基本设置</span><span>SEO设置</span><span>模板设置</span></div>
            <div class="tabCon">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">上级栏目：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <if condition="$cates[$parent_id]">{$cates[$parent_id]['cate_name']}<else /> 顶级栏目</if>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>{$TITLE}名称：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <input type="text" class="input-text" value="" datatype="*2-16" nullmsg="{$TITLE}名称不能为空" id="cate_name" name="cate_name">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>排序：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <input type="text" class="input-text" value="" datatype="*1-3" nullmsg="排序不能为空" id="sort" name="sort">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">备注：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <textarea name="remark" id="remark" cols="" rows="" class="textarea"  placeholder="说点什么...100个字符以内" dragonfly="true" onKeyUp="$.Huitextarealength(this,100)"></textarea>
                        <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
                    </div>
                </div>
            </div>
            <div class="tabCon">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">SEO标题：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <input type="text" class="input-text" name="seo_title">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">SEO关键词：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <input type="text" class="input-text" name="seo_keywords">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">SEO描述：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <textarea name="seo_description" cols="" rows="" class="textarea"  placeholder="说点什么...100个字符以内" dragonfly="true" onKeyUp="$.Huitextarealength(this,100)"></textarea>
                        <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
                    </div>
                </div>
            </div>
            <div class="tabCon">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">列表页模板：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <php>
                            $list_tpls=$tpl_list;
                            unset($list_tpls['list']);
                        </php>
                         <span class="select-box">
                            <select class="select" name="list_tpl">
                                <option value="list">list{:C("TMPL_TEMPLATE_SUFFIX")}</option>
                                <foreach name="list_tpls" item="vo">
                                    <option value="{$vo}">{$vo}{:C("TMPL_TEMPLATE_SUFFIX")}</option>
                                </foreach>
                            </select>
                         </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3">文章页模板：</label>
                    <div class="formControls col-xs-8 col-sm-8">
                        <php>
                            $article_tpls=$tpl_list;
                            unset($article_tpls['article']);
                        </php>
                        <span class="select-box">
                            <select class="select" name="article_tpl">
                                <option value="article">article{:C("TMPL_TEMPLATE_SUFFIX")}</option>
                                <foreach name="article_tpls" item="vo">
                                    <option value="{$vo}">{$vo}{:C("TMPL_TEMPLATE_SUFFIX")}</option>
                                </foreach>
                            </select>
                        </span>
                    </div>
                </div>
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-8 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</block>
<block name="js">
    <script type="text/javascript">
        $(function(){
            $.Huitab("#tab-system .tabBar span","#tab-system .tabCon","current","click","0");
        });
    </script>
</block>